<!DOCTYPE html>
<html>
<!-- Created by GNU Texinfo 7.1, https://www.gnu.org/software/texinfo/ -->
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<!-- Copyright © 1988-2023 Free Software Foundation, Inc.

Permission is granted to copy, distribute and/or modify this document
under the terms of the GNU Free Documentation License, Version 1.3 or
any later version published by the Free Software Foundation; with the
Invariant Sections being "Funding Free Software", the Front-Cover
Texts being (a) (see below), and with the Back-Cover Texts being (b)
(see below).  A copy of the license is included in the section entitled
"GNU Free Documentation License".

(a) The FSF's Front-Cover Text is:

A GNU Manual

(b) The FSF's Back-Cover Text is:

You have freedom to copy and modify this GNU Manual, like GNU
     software.  Copies published by the Free Software Foundation raise
     funds for GNU development. -->
<title>GIMPLE_DEBUG (GNU Compiler Collection (GCC) Internals)</title>

<meta name="description" content="GIMPLE_DEBUG (GNU Compiler Collection (GCC) Internals)">
<meta name="keywords" content="GIMPLE_DEBUG (GNU Compiler Collection (GCC) Internals)">
<meta name="resource-type" content="document">
<meta name="distribution" content="global">
<meta name="Generator" content="makeinfo">
<meta name="viewport" content="width=device-width,initial-scale=1">

<link href="index.html" rel="start" title="Top">
<link href="Option-Index.html" rel="index" title="Option Index">
<link href="index.html#SEC_Contents" rel="contents" title="Table of Contents">
<link href="Tuple-specific-accessors.html" rel="up" title="Tuple specific accessors">
<link href="GIMPLE_005fEH_005fFILTER.html" rel="next" title="GIMPLE_EH_FILTER">
<link href="GIMPLE_005fCOND.html" rel="prev" title="GIMPLE_COND">
<style type="text/css">
<!--
a.copiable-link {visibility: hidden; text-decoration: none; line-height: 0em}
span:hover a.copiable-link {visibility: visible}
strong.def-name {font-family: monospace; font-weight: bold; font-size: larger}
-->
</style>


</head>

<body lang="en">
<div class="subsection-level-extent" id="GIMPLE_005fDEBUG">
<div class="nav-panel">
<p>
Next: <a href="GIMPLE_005fEH_005fFILTER.html" accesskey="n" rel="next"><code class="code">GIMPLE_EH_FILTER</code></a>, Previous: <a href="GIMPLE_005fCOND.html" accesskey="p" rel="prev"><code class="code">GIMPLE_COND</code></a>, Up: <a href="Tuple-specific-accessors.html" accesskey="u" rel="up">Tuple specific accessors</a> &nbsp; [<a href="index.html#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="Option-Index.html" title="Index" rel="index">Index</a>]</p>
</div>
<hr>
<h4 class="subsection" id="GIMPLE_005fDEBUG-1"><span>12.8.7 <code class="code">GIMPLE_DEBUG</code><a class="copiable-link" href="#GIMPLE_005fDEBUG-1"> &para;</a></span></h4>
<a class="index-entry-id" id="index-GIMPLE_005fDEBUG"></a>
<a class="index-entry-id" id="index-GIMPLE_005fDEBUG_005fBIND"></a>
<a class="index-entry-id" id="index-GIMPLE_005fDEBUG_005fBEGIN_005fSTMT"></a>
<a class="index-entry-id" id="index-GIMPLE_005fDEBUG_005fINLINE_005fENTRY"></a>

<dl class="first-deftypefn">
<dt class="deftypefn" id="index-_002agimple_005fbuild_005fdebug_005fbind"><span class="category-def">GIMPLE function: </span><span><code class="def-type">gdebug</code> <strong class="def-name">*gimple_build_debug_bind</strong> <code class="def-code-arguments">(tree var, tree value, gimple stmt)</code><a class="copiable-link" href="#index-_002agimple_005fbuild_005fdebug_005fbind"> &para;</a></span></dt>
<dd><p>Build a <code class="code">GIMPLE_DEBUG</code> statement with <code class="code">GIMPLE_DEBUG_BIND</code>
<code class="code">subcode</code>.  The effect of this statement is to tell debug
information generation machinery that the value of user variable
<code class="code">var</code> is given by <code class="code">value</code> at that point, and to remain with
that value until <code class="code">var</code> runs out of scope, a
dynamically-subsequent debug bind statement overrides the binding, or
conflicting values reach a control flow merge point.  Even if
components of the <code class="code">value</code> expression change afterwards, the
variable is supposed to retain the same value, though not necessarily
the same location.
</p>
<p>It is expected that <code class="code">var</code> be most often a tree for automatic user
variables (<code class="code">VAR_DECL</code> or <code class="code">PARM_DECL</code>) that satisfy the
requirements for gimple registers, but it may also be a tree for a
scalarized component of a user variable (<code class="code">ARRAY_REF</code>,
<code class="code">COMPONENT_REF</code>), or a debug temporary (<code class="code">DEBUG_EXPR_DECL</code>).
</p>
<p>As for <code class="code">value</code>, it can be an arbitrary tree expression, but it is
recommended that it be in a suitable form for a gimple assignment
<code class="code">RHS</code>.  It is not expected that user variables that could appear
as <code class="code">var</code> ever appear in <code class="code">value</code>, because in the latter we&rsquo;d
have their <code class="code">SSA_NAME</code>s instead, but even if they were not in SSA
form, user variables appearing in <code class="code">value</code> are to be regarded as
part of the executable code space, whereas those in <code class="code">var</code> are to
be regarded as part of the source code space.  There is no way to
refer to the value bound to a user variable within a <code class="code">value</code>
expression.
</p>
<p>If <code class="code">value</code> is <code class="code">GIMPLE_DEBUG_BIND_NOVALUE</code>, debug information
generation machinery is informed that the variable <code class="code">var</code> is
unbound, i.e., that its value is indeterminate, which sometimes means
it is really unavailable, and other times that the compiler could not
keep track of it.
</p>
<p>Block and location information for the newly-created stmt are
taken from <code class="code">stmt</code>, if given.
</p></dd></dl>

<dl class="first-deftypefn">
<dt class="deftypefn" id="index-gimple_005fdebug_005fbind_005fget_005fvar"><span class="category-def">GIMPLE function: </span><span><code class="def-type">tree</code> <strong class="def-name">gimple_debug_bind_get_var</strong> <code class="def-code-arguments">(gimple stmt)</code><a class="copiable-link" href="#index-gimple_005fdebug_005fbind_005fget_005fvar"> &para;</a></span></dt>
<dd><p>Return the user variable <var class="var">var</var> that is bound at <code class="code">stmt</code>.
</p></dd></dl>

<dl class="first-deftypefn">
<dt class="deftypefn" id="index-gimple_005fdebug_005fbind_005fget_005fvalue"><span class="category-def">GIMPLE function: </span><span><code class="def-type">tree</code> <strong class="def-name">gimple_debug_bind_get_value</strong> <code class="def-code-arguments">(gimple stmt)</code><a class="copiable-link" href="#index-gimple_005fdebug_005fbind_005fget_005fvalue"> &para;</a></span></dt>
<dd><p>Return the value expression that is bound to a user variable at
<code class="code">stmt</code>.
</p></dd></dl>

<dl class="first-deftypefn">
<dt class="deftypefn" id="index-gimple_005fdebug_005fbind_005fget_005fvalue_005fptr"><span class="category-def">GIMPLE function: </span><span><code class="def-type">tree *</code> <strong class="def-name">gimple_debug_bind_get_value_ptr</strong> <code class="def-code-arguments">(gimple stmt)</code><a class="copiable-link" href="#index-gimple_005fdebug_005fbind_005fget_005fvalue_005fptr"> &para;</a></span></dt>
<dd><p>Return a pointer to the value expression that is bound to a user
variable at <code class="code">stmt</code>.
</p></dd></dl>

<dl class="first-deftypefn">
<dt class="deftypefn" id="index-gimple_005fdebug_005fbind_005fset_005fvar"><span class="category-def">GIMPLE function: </span><span><code class="def-type">void</code> <strong class="def-name">gimple_debug_bind_set_var</strong> <code class="def-code-arguments">(gimple stmt, tree var)</code><a class="copiable-link" href="#index-gimple_005fdebug_005fbind_005fset_005fvar"> &para;</a></span></dt>
<dd><p>Modify the user variable bound at <code class="code">stmt</code> to <var class="var">var</var>.
</p></dd></dl>

<dl class="first-deftypefn">
<dt class="deftypefn" id="index-gimple_005fdebug_005fbind_005fset_005fvalue"><span class="category-def">GIMPLE function: </span><span><code class="def-type">void</code> <strong class="def-name">gimple_debug_bind_set_value</strong> <code class="def-code-arguments">(gimple stmt, tree var)</code><a class="copiable-link" href="#index-gimple_005fdebug_005fbind_005fset_005fvalue"> &para;</a></span></dt>
<dd><p>Modify the value bound to the user variable bound at <code class="code">stmt</code> to
<var class="var">value</var>.
</p></dd></dl>

<dl class="first-deftypefn">
<dt class="deftypefn" id="index-gimple_005fdebug_005fbind_005freset_005fvalue"><span class="category-def">GIMPLE function: </span><span><code class="def-type">void</code> <strong class="def-name">gimple_debug_bind_reset_value</strong> <code class="def-code-arguments">(gimple stmt)</code><a class="copiable-link" href="#index-gimple_005fdebug_005fbind_005freset_005fvalue"> &para;</a></span></dt>
<dd><p>Modify the value bound to the user variable bound at <code class="code">stmt</code> so
that the variable becomes unbound.
</p></dd></dl>

<dl class="first-deftypefn">
<dt class="deftypefn" id="index-gimple_005fdebug_005fbind_005fhas_005fvalue_005fp"><span class="category-def">GIMPLE function: </span><span><code class="def-type">bool</code> <strong class="def-name">gimple_debug_bind_has_value_p</strong> <code class="def-code-arguments">(gimple stmt)</code><a class="copiable-link" href="#index-gimple_005fdebug_005fbind_005fhas_005fvalue_005fp"> &para;</a></span></dt>
<dd><p>Return <code class="code">TRUE</code> if <code class="code">stmt</code> binds a user variable to a value,
and <code class="code">FALSE</code> if it unbinds the variable.
</p></dd></dl>

<dl class="first-deftypefn">
<dt class="deftypefn" id="index-gimple_005fbuild_005fdebug_005fbegin_005fstmt"><span class="category-def">GIMPLE function: </span><span><code class="def-type">gimple</code> <strong class="def-name">gimple_build_debug_begin_stmt</strong> <code class="def-code-arguments">(tree block, location_t location)</code><a class="copiable-link" href="#index-gimple_005fbuild_005fdebug_005fbegin_005fstmt"> &para;</a></span></dt>
<dd><p>Build a <code class="code">GIMPLE_DEBUG</code> statement with
<code class="code">GIMPLE_DEBUG_BEGIN_STMT</code> <code class="code">subcode</code>.  The effect of this
statement is to tell debug information generation machinery that the
user statement at the given <code class="code">location</code> and <code class="code">block</code> starts at
the point at which the statement is inserted.  The intent is that side
effects (e.g. variable bindings) of all prior user statements are
observable, and that none of the side effects of subsequent user
statements are.
</p></dd></dl>

<dl class="first-deftypefn">
<dt class="deftypefn" id="index-gimple_005fbuild_005fdebug_005finline_005fentry"><span class="category-def">GIMPLE function: </span><span><code class="def-type">gimple</code> <strong class="def-name">gimple_build_debug_inline_entry</strong> <code class="def-code-arguments">(tree block, location_t location)</code><a class="copiable-link" href="#index-gimple_005fbuild_005fdebug_005finline_005fentry"> &para;</a></span></dt>
<dd><p>Build a <code class="code">GIMPLE_DEBUG</code> statement with
<code class="code">GIMPLE_DEBUG_INLINE_ENTRY</code> <code class="code">subcode</code>.  The effect of this
statement is to tell debug information generation machinery that a
function call at <code class="code">location</code> underwent inline substitution, that
<code class="code">block</code> is the enclosing lexical block created for the
substitution, and that at the point of the program in which the stmt is
inserted, all parameters for the inlined function are bound to the
respective arguments, and none of the side effects of its stmts are
observable.
</p></dd></dl>

</div>
<hr>
<div class="nav-panel">
<p>
Next: <a href="GIMPLE_005fEH_005fFILTER.html"><code class="code">GIMPLE_EH_FILTER</code></a>, Previous: <a href="GIMPLE_005fCOND.html"><code class="code">GIMPLE_COND</code></a>, Up: <a href="Tuple-specific-accessors.html">Tuple specific accessors</a> &nbsp; [<a href="index.html#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="Option-Index.html" title="Index" rel="index">Index</a>]</p>
</div>



</body>
</html>
